package bch.rocketmq.test;

import org.apache.rocketmq.common.ThreadFactoryImpl;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;

public class ThreadStat {
    private final ScheduledExecutorService scheduledExecutorService = Executors
            .newSingleThreadScheduledExecutor(new ThreadFactoryImpl("PullMessageServiceScheduledThread"));

    public static void main(String[] args) {
        System.out.println(new ThreadStat().f(10));
    }

    public int f(int i) {
        if (i <= 2) {
            return i;
        } else {
            return f(i - 1) + f(i - 2);
        }
    }
}
